package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.StorePhysicalQuantityMapper;
import com.qj.yantaishan.domain.StorePhysicalQuantity;
import com.qj.yantaishan.service.IStorePhysicalQuantityService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 仓库分配库存关系Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class StorePhysicalQuantityServiceImpl    extends ServiceImpl<StorePhysicalQuantityMapper, StorePhysicalQuantity>  implements IStorePhysicalQuantityService
{
    @Autowired
    private StorePhysicalQuantityMapper storePhysicalQuantityMapper;

    /**
     * 查询仓库分配库存关系
     * 
     * @param pigcmsId 仓库分配库存关系主键
     * @return 仓库分配库存关系
     */
    @Override
    public StorePhysicalQuantity selectStorePhysicalQuantityByPigcmsId(Long pigcmsId)
    {
        return storePhysicalQuantityMapper.selectStorePhysicalQuantityByPigcmsId(pigcmsId);
    }

    /**
     * 查询仓库分配库存关系列表
     * 
     * @param storePhysicalQuantity 仓库分配库存关系
     * @return 仓库分配库存关系
     */
    @Override
    public List<StorePhysicalQuantity> selectStorePhysicalQuantityList(StorePhysicalQuantity storePhysicalQuantity)
    {
        return storePhysicalQuantityMapper.selectStorePhysicalQuantityList(storePhysicalQuantity);
    }

    /**
     * 新增仓库分配库存关系
     * 
     * @param storePhysicalQuantity 仓库分配库存关系
     * @return 结果
     */
    @Override
    public int insertStorePhysicalQuantity(StorePhysicalQuantity storePhysicalQuantity)
    {
        return storePhysicalQuantityMapper.insertStorePhysicalQuantity(storePhysicalQuantity);
    }

    /**
     * 修改仓库分配库存关系
     * 
     * @param storePhysicalQuantity 仓库分配库存关系
     * @return 结果
     */
    @Override
    public int updateStorePhysicalQuantity(StorePhysicalQuantity storePhysicalQuantity)
    {
        return storePhysicalQuantityMapper.updateStorePhysicalQuantity(storePhysicalQuantity);
    }

    /**
     * 批量删除仓库分配库存关系
     * 
     * @param pigcmsIds 需要删除的仓库分配库存关系主键
     * @return 结果
     */
    @Override
    public int deleteStorePhysicalQuantityByPigcmsIds(String pigcmsIds)
    {
        return storePhysicalQuantityMapper.deleteStorePhysicalQuantityByPigcmsIds(Convert.toStrArray(pigcmsIds));
    }

    /**
     * 删除仓库分配库存关系信息
     * 
     * @param pigcmsId 仓库分配库存关系主键
     * @return 结果
     */
    @Override
    public int deleteStorePhysicalQuantityByPigcmsId(Long pigcmsId)
    {
        return storePhysicalQuantityMapper.deleteStorePhysicalQuantityByPigcmsId(pigcmsId);
    }
}
